import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '科研项目',
    align: "left",
    dataIndex: 'kyName',
    width:450
  },
  {
    title: '科研方案数量',
    align: "center",
    dataIndex: 'planNum',
    width:150,
  },
  {
    title: '实验项目数量',
    align: "center",
    dataIndex: 'itemNum',
    width:150,
  },
  {
    title: '实验人',
    align: "center",
    dataIndex: 'userName',
    width:150,
  },
  {
    title: '审核人',
    align: "center",
    dataIndex: 'auditName',
    width:150,
  }
  // {
  //   title: '开始日期',
  //   align: "center",
  //   dataIndex: 'kyStartDate',
  //   customRender:({text}) =>{
  //     return !text?"":(text.length>10?text.substr(0,10):text);
  //   },
  //   width:110,
  // },
  // {
  //   title: '结束日期',
  //   align: "center",
  //   dataIndex: 'kyEndDate',
  //   customRender:({text}) =>{
  //     return !text?"":(text.length>10?text.substr(0,10):text);
  //   },
  //   width:110,
  // },
];
export const columnsRecord: BasicColumn[] = [
  
  {
    title: '实验项目',
    align: "left",
    dataIndex: 'itemName',
    width:120
  },
  {
    title: '实验人员',
    align: "left",
    dataIndex: 'userName',
    width:110
  },
  {
    title: '项目状态',
    align: "center",
    dataIndex: 'itemStatus',
    width:110,
  },
  {
    title: '实验开始时间',
    align: 'center',
    dataIndex: 'itemStartTime',
    width:110,
  },
  {
    title: '实验截至时间',
    align: 'center',
    dataIndex: 'itemFinishTime',
    width:110,
  },
  {
    title: '科研方案',
    align: "left",
    dataIndex: 'planTitle',
    width:150
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '科研id',
    field: 'kyId',
    component: 'Input',
  },
  {
    label: '科研名称',
    field: 'kyName',
    component: 'Input',
  },
  {
    label: '科研内容',
    field: 'kyContent',
    component: 'Input',
  },
  {
    label: '科研日期',
    field: 'kyDate',
    component: 'DatePicker',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

